﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020013DF RID: 5087
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class TrainPartyEvent : IMessage<TrainPartyEvent>, IMessage, IEquatable<TrainPartyEvent>, IDeepCloneable<TrainPartyEvent>, IBufferMessage
	{
		// Token: 0x17004026 RID: 16422
		// (get) Token: 0x0600E3D8 RID: 58328 RVA: 0x0026125B File Offset: 0x0025F45B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<TrainPartyEvent> Parser
		{
			get
			{
				return TrainPartyEvent._parser;
			}
		}

		// Token: 0x17004027 RID: 16423
		// (get) Token: 0x0600E3D9 RID: 58329 RVA: 0x00261262 File Offset: 0x0025F462
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return TrainPartyEventReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17004028 RID: 16424
		// (get) Token: 0x0600E3DA RID: 58330 RVA: 0x00261274 File Offset: 0x0025F474
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return TrainPartyEvent.Descriptor;
			}
		}

		// Token: 0x0600E3DB RID: 58331 RVA: 0x0026127B File Offset: 0x0025F47B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public TrainPartyEvent()
		{
		}

		// Token: 0x0600E3DC RID: 58332 RVA: 0x00261290 File Offset: 0x0025F490
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public TrainPartyEvent(TrainPartyEvent other) : this()
		{
			this.optionList_ = other.optionList_.Clone();
			this.eventType_ = other.eventType_;
			this.eventId_ = other.eventId_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600E3DD RID: 58333 RVA: 0x002612DD File Offset: 0x0025F4DD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public TrainPartyEvent Clone()
		{
			return new TrainPartyEvent(this);
		}

		// Token: 0x17004029 RID: 16425
		// (get) Token: 0x0600E3DE RID: 58334 RVA: 0x002612E5 File Offset: 0x0025F4E5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<TrainPartyOption> OptionList
		{
			get
			{
				return this.optionList_;
			}
		}

		// Token: 0x1700402A RID: 16426
		// (get) Token: 0x0600E3DF RID: 58335 RVA: 0x002612ED File Offset: 0x0025F4ED
		// (set) Token: 0x0600E3E0 RID: 58336 RVA: 0x002612F5 File Offset: 0x0025F4F5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public TrainPartyEventType EventType
		{
			get
			{
				return this.eventType_;
			}
			set
			{
				this.eventType_ = value;
			}
		}

		// Token: 0x1700402B RID: 16427
		// (get) Token: 0x0600E3E1 RID: 58337 RVA: 0x002612FE File Offset: 0x0025F4FE
		// (set) Token: 0x0600E3E2 RID: 58338 RVA: 0x00261306 File Offset: 0x0025F506
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint EventId
		{
			get
			{
				return this.eventId_;
			}
			set
			{
				this.eventId_ = value;
			}
		}

		// Token: 0x0600E3E3 RID: 58339 RVA: 0x0026130F File Offset: 0x0025F50F
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as TrainPartyEvent);
		}

		// Token: 0x0600E3E4 RID: 58340 RVA: 0x00261320 File Offset: 0x0025F520
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(TrainPartyEvent other)
		{
			return other != null && (other == this || (this.optionList_.Equals(other.optionList_) && this.EventType == other.EventType && this.EventId == other.EventId && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600E3E5 RID: 58341 RVA: 0x00261380 File Offset: 0x0025F580
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			num ^= this.optionList_.GetHashCode();
			if (this.EventType != TrainPartyEventType.KDialogueEventNone)
			{
				num ^= this.EventType.GetHashCode();
			}
			if (this.EventId != 0U)
			{
				num ^= this.EventId.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600E3E6 RID: 58342 RVA: 0x002613EC File Offset: 0x0025F5EC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600E3E7 RID: 58343 RVA: 0x002613F4 File Offset: 0x0025F5F4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600E3E8 RID: 58344 RVA: 0x00261400 File Offset: 0x0025F600
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.EventId != 0U)
			{
				output.WriteRawTag(80);
				output.WriteUInt32(this.EventId);
			}
			if (this.EventType != TrainPartyEventType.KDialogueEventNone)
			{
				output.WriteRawTag(96);
				output.WriteEnum((int)this.EventType);
			}
			this.optionList_.WriteTo(ref output, TrainPartyEvent._repeated_optionList_codec);
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600E3E9 RID: 58345 RVA: 0x0026146C File Offset: 0x0025F66C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			num += this.optionList_.CalculateSize(TrainPartyEvent._repeated_optionList_codec);
			if (this.EventType != TrainPartyEventType.KDialogueEventNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.EventType);
			}
			if (this.EventId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.EventId);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600E3EA RID: 58346 RVA: 0x002614D8 File Offset: 0x0025F6D8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(TrainPartyEvent other)
		{
			if (other == null)
			{
				return;
			}
			this.optionList_.Add(other.optionList_);
			if (other.EventType != TrainPartyEventType.KDialogueEventNone)
			{
				this.EventType = other.EventType;
			}
			if (other.EventId != 0U)
			{
				this.EventId = other.EventId;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600E3EB RID: 58347 RVA: 0x00261539 File Offset: 0x0025F739
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x0600E3EC RID: 58348 RVA: 0x00261544 File Offset: 0x0025F744
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 80U)
				{
					if (num != 96U)
					{
						if (num != 114U)
						{
							this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
						}
						else
						{
							this.optionList_.AddEntriesFrom(ref input, TrainPartyEvent._repeated_optionList_codec);
						}
					}
					else
					{
						this.EventType = (TrainPartyEventType)input.ReadEnum();
					}
				}
				else
				{
					this.EventId = input.ReadUInt32();
				}
			}
		}

		// Token: 0x04005A22 RID: 23074
		private static readonly MessageParser<TrainPartyEvent> _parser = new MessageParser<TrainPartyEvent>(() => new TrainPartyEvent());

		// Token: 0x04005A23 RID: 23075
		private UnknownFieldSet _unknownFields;

		// Token: 0x04005A24 RID: 23076
		public const int OptionListFieldNumber = 14;

		// Token: 0x04005A25 RID: 23077
		private static readonly FieldCodec<TrainPartyOption> _repeated_optionList_codec = FieldCodec.ForMessage<TrainPartyOption>(114U, TrainPartyOption.Parser);

		// Token: 0x04005A26 RID: 23078
		private readonly RepeatedField<TrainPartyOption> optionList_ = new RepeatedField<TrainPartyOption>();

		// Token: 0x04005A27 RID: 23079
		public const int EventTypeFieldNumber = 12;

		// Token: 0x04005A28 RID: 23080
		private TrainPartyEventType eventType_;

		// Token: 0x04005A29 RID: 23081
		public const int EventIdFieldNumber = 10;

		// Token: 0x04005A2A RID: 23082
		private uint eventId_;
	}
}
